package com.sbm.merge.model;

public class ModelProxy {


    OldModel oldModel;
    NewModel newModel;


    boolean modelSwitch;

    public ModelProxy(OldModel oldModel) {
        this.oldModel = oldModel;
    }

    public ModelProxy(NewModel newModel) {
        this.newModel = newModel;
        this.modelSwitch = true;
    }

    public ModelProxy(OldModel oldModel, NewModel newModel, boolean modelSwitch) {
        this.oldModel = oldModel;
        this.newModel = newModel;
        this.modelSwitch = modelSwitch;
    }

    public String getA() {
        return modelSwitch ? newModel.getA(): oldModel.getA();
    }


    public String getB() {
        return modelSwitch ? newModel.getB() : oldModel.getB();
    }


    public String getC() {
        return modelSwitch ? null : oldModel.getC();
    }



}
